package com.xja.cloud.entity;

import java.io.Serializable;

public class ResultVO implements Serializable {
    private Integer code;
    private String msg;
    private Object object;
    public ResultVO(Integer code, String msg, Object object) {
        this.code = code;
        this.msg = msg;
        this.object = object;
    }

    public ResultVO() {
    }

    public static ResultVO success(String msg, Object object){
        return new ResultVO(200,msg,object);
    }

    public static ResultVO error(){
        return new ResultVO(500,"异常",null);
    }

    public static ResultVO none(String msg){
        return new ResultVO(100,msg,null);
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }
}
